<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <title>成都家政服务系统</title>
    <!-- Bootstrap core CSS -->
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap-theme.min.css')}}">
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="{{asset('jquery.js')}}"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="{{asset('bootstrap/js/bootstrap.min.js')}}"></script>
</head>
<body>
<div style="height:100%;width:100%;position:fixed;z-index: -20">
    <img src="{{asset('img/bg1.jpg')}}" style="height:100%;width:100%;">
</div>
<div class="con-header">
    <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <a href="javascript:;" class="navbar-brand">成都家政服务系统</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="/employee.searchAreaTask">任务栏</a></li>
                    <li><a href="/">财务统计</a></li>
                    <li><a href="/">我的信息</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="javascript:;">{{session("employee_name")}}，欢迎您</a></li>
                    <li><a href="javascript:;">职位：{{session("employee_power")}}</a></li>
                    <li><a href="/adminLogout" style="color: red">退出</a></li>
                </ul>
            </div><!--/.nav-collapse -->
        </div>
    </nav>
</div>
<div style="height:50px;"></div>
@if(session('__Ajax_RedirectFunc_status') == true)
    <div>
        <div class="alert alert-success alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>成功</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
@if(session('__Ajax_RedirectFunc_status') === false)
    <div >
        <div class="alert alert-danger alert-dismissible fade in" role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
            <h3>失败</h3>
            <p><?php echo session('__Ajax_RedirectFunc_message');?></p>
            <p><?php echo session('__Ajax_RedirectFunc_plugin');?></p>
        </div>
    </div>
@endif
<div style="height:50px;"></div>
<div class="con-body">
    <div class="banner">
        <div class="container">
            <div class="row">
                <div class="col-md-12" >
                    <div class="panel panel-default">
                        <div class="panel-body" >
                            <h3>当前任务：{{$nowTask->task_name}}</h3>
                            <hr>
                            <div class="col-md-8" >
                                <h4>发布日期：{{$nowTask->task_time}}</h4>
                                <br>
                                <h4>任务说明：{{$nowTask->task_info}}</h4>
                                <br>
                                <h4>任务酬劳：{{$nowTask->task_money}}</h4>
                                <br>
                                <h4>任务联系人：{{$nowTask->task_people}}</h4>
                                <br>
                                <h4>任务联系方式：{{$nowTask->task_phone}}</h4>
                            </div>
                            <div class="col-md-4 well">
                                <h3>领取人：{{$employee_name}}</h3>
                                <br>
                                <h3>联系方式：{{$employee_phone}}</h3>
                                <br>
                                <hr>
                                @if($employee_name == '暂无')
                                    <button type="button" class="btn btn-primary btn-block btn-sm" data-toggle="modal" data-target="#taskToEmployee">领取任务</button>
                                    <div class="modal fade" id="taskToEmployee" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                                                    <h4 class="modal-title" id="myModalLabel">当前任务：{{$nowTask->task_name}}</h4>
                                                </div>
                                                <div class="modal-body">
                                                    <h4>确定要领取此任务吗？</h4>
                                                </div>
                                                <div class="modal-footer">
                                                    <form action="/employee.employeeToTask" method="post">
                                                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                                        <input type="hidden" name="task_id" value="{{$nowTask->task_id}}">
                                                        <button type="submit" class="btn btn-primary" >领取任务</button>
                                                        <button type="button" class="btn btn-default" data-dismiss="modal">返回</button>
                                                    </form>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                @endif
                            </div>
                            <hr>
                        </div>
                    </div>
                </div>
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div class="col-md-12" >
                                <h4>任务评价</h4>
                                <hr>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>